/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.supplychainmana;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.psi.mapper.supplychainmana.SupplierCtrlMapper;
public class SupplierCtrl extends BaseAction
{
    @Autowired(required=false)
	private SupplierCtrlMapper mapper;
    /**
    商机管理
    */
    
    public Map businessMana() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_predict=mapper.s_predict(params);
        result.put("s_predict", s_predict);
        
        return result;
    }
    /**
    增加新商机
    */
    
    public Map businessAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        
        SQLList<SQLMap> client=mapper.client(params);
        result.put("client", client);
        
        return result;
    }
    /**
    组成部分
    */
    
    public Map businesStructure() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> part=mapper.part(params);
        result.put("part", part);
        
        return result;
    }
    /**
    增加组成
    */
    
    public Map businesStructureAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        return result;
    }
    /**
    产品报价
    */
    
    public Map productOffer() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_qp=mapper.s_qp(params);
        result.put("s_qp", s_qp);
        
        return result;
    }
    /**
    增加报价
    */
    
    public Map productOfferAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> cmessg=mapper.cmessg(params);
        result.put("cmessg", cmessg);
        
        
        SQLList<SQLMap> s_predict=mapper.s_predict(params);
        result.put("s_predict", s_predict);
        
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        
        SQLList<SQLMap> lct=mapper.lct(params);
        result.put("lct", lct);
        
        return result;
    }
    /**
    报价补充
    */
    
    public Map productOfferSupp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        result.put("produce", produce);
        
        
        SQLList<SQLMap> price=mapper.price(params);
        result.put("price", price);
        
        
        SQLList<SQLMap> quo=mapper.quo(params);
        SQLMap quo_emt=quo.getExistfirst();
        result.put("quo", quo_emt);
        
        
        SQLList<SQLMap> pum=mapper.pum(params);
        result.put("pum", pum);
        
        
        SQLList<SQLMap> s_demand=mapper.s_demand(params);
        result.put("s_demand", s_demand);
        
        
        SQLList<SQLMap> s_breakduty=mapper.s_breakduty(params);
        result.put("s_breakduty", s_breakduty);
        
        
        SQLList<SQLMap> s_pay=mapper.s_pay(params);
        result.put("s_pay", s_pay);
        
        
        SQLList<SQLMap> s_duty=mapper.s_duty(params);
        result.put("s_duty", s_duty);
        
        return result;
    }
    /**
    条目选择
    */
    
    public Map offerSuppEntry() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> classid=mapper.classid(params);
        result.put("classid", classid);
        
        
        SQLList<SQLMap> cate=mapper.cate(params);
        SQLMap cate_emt=cate.getExistfirst();
        result.put("cate", cate_emt);
        
        
        SQLList<SQLMap> product_list=mapper.product_list(params);
        result.put("product_list", product_list);
        
        return result;
    }
    /**
    责任选择
    */
    
    public Map offerSuppDuty() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_demand=mapper.s_demand(params);
        result.put("s_demand", s_demand);
        
        
        SQLList<SQLMap> s_demand1=mapper.s_demand1(params);
        result.put("s_demand1", s_demand1);
        
        return result;
    }
    /**
    违约责任选择
    */
    
    public Map offerSuppTear() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_lbreakduty=mapper.s_lbreakduty(params);
        result.put("s_lbreakduty", s_lbreakduty);
        
        
        SQLList<SQLMap> s_breakduty=mapper.s_breakduty(params);
        result.put("s_breakduty", s_breakduty);
        
        return result;
    }
    /**
    其他要求选择
    */
    
    public Map offerSuppOther() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_demand=mapper.s_demand(params);
        result.put("s_demand", s_demand);
        
        
        SQLList<SQLMap> s_demand1=mapper.s_demand1(params);
        result.put("s_demand1", s_demand1);
        
        return result;
    }
    /**
    邮件信息
    */
    
    public Map supplierEmail() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> sent=mapper.sent(params);
        result.put("sent", sent);
        
        return result;
    }
    /**
    新消息
    */
    
    public Map newsEmail() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        return result;
    }
    /**
    明细信息
    */
    
    public Map emailDetailed() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> sent=mapper.sent(params);
        SQLMap sent_emt=sent.getExistfirst();
        result.put("sent", sent_emt);
        
        return result;
    }
    /**
    修改
    */
    
    public Map emailUpdate() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> sent=mapper.sent(params);
        SQLMap sent_emt=sent.getExistfirst();
        result.put("sent", sent_emt);
        
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        return result;
    }
    /**
    关联文件
    */
    
    public Map supplierRelationFiles() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> file_admin=mapper.file_admin(params);
        result.put("file_admin", file_admin);
        
        return result;
    }
    /**
    商机
    */
    
    public Map businessSupplier() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> bus=mapper.bus(params);
        result.put("bus", bus);
        
        
        
        return result;
    }
    /**
    增加新商机修改
    */
    
    public Map businessAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        return result;
    }
    /**
    增加组成修改
    */
    
    public Map businesStructureAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID2 = mapper.CMID2(params);
        result.put("CMID2", CMID2);
        
        return result;
    }
    /**
    增加报价修改
    */
    
    public Map productOfferAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        return result;
    }
    /**
    条目选择修改
    */
    
    public Map offerSuppEntrySubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("quo_producenum")){
            params=new SQLParam(request,emt.getMap());
            mapper.u_product(params);
        }
        
        return result;
    }
    /**
    责任选择修改
    */
    
    public Map offerSuppDutySubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int d_demand = mapper.d_demand(params);
        result.put("d_demand", d_demand);
        
        
        for (SQLMap emt:hqlBean.getTableElements("duty")){
            params=new SQLParam(request,emt.getMap());
            mapper.i_demand(params);
        }
        
        return result;
    }
    /**
    付款方式修改
    */
    
    public Map offerSupPaymentSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int pay = mapper.pay(params);
        result.put("pay", pay);
        
        return result;
    }
    /**
    违约责任选择修改
    */
    
    public Map offerSuppTearSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int d_demand = mapper.d_demand(params);
        result.put("d_demand", d_demand);
        
        
        for (SQLMap emt:hqlBean.getTableElements("breakduty")){
            params=new SQLParam(request,emt.getMap());
            mapper.i_demand(params);
        }
        
        return result;
    }
    /**
    其他要求选择修改
    */
    
    public Map offerSuppOtherSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int d_demand = mapper.d_demand(params);
        result.put("d_demand", d_demand);
        
        
        for (SQLMap emt:hqlBean.getTableElements("demand")){
            params=new SQLParam(request,emt.getMap());
            mapper.i_demand(params);
        }
        
        return result;
    }
    /**
    新消息修改
    */
    
    public Map newsEmailSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        return result;
    }
    /**
    修改修改
    */
    
    public Map emailUpdateSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.emailUpdateSubmit(params);
        
        return result;
    }
    /**
    */
    
    public Map d_file() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_file(params);
        
        return result;
    }
    /**
    增加文件修改
    */
    
    public Map filesAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int i_file_admin = mapper.i_file_admin(params);
        result.put("i_file_admin", i_file_admin);
        
        return result;
    }
    /**
    */
    
    public Map d_business() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_business(params);
        
        return result;
    }
}